package fr.esiag.isidis.epp.search;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

public class PointCdcRowMappercumul  implements RowMapper<Object>{
	
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		PointCdc cdc = new PointCdc();
		cdc.setDateConso(rs.getInt("TDATE"));
		cdc.setHeureConso(rs.getInt("THOUR"));
		cdc.setTemperature(rs.getFloat("SUM(temprature)"));
		cdc.setPuissance(rs.getInt("SUM(power)"));
		cdc.setPoids(rs.getFloat("SUM(weight)"));
		cdc.setId(rs.getString("IDSITE"));
		return cdc;
	}
}
